package com.wanjia.estate.constant;

import lombok.AllArgsConstructor;

import java.util.Objects;
import java.util.stream.Stream;

@AllArgsConstructor
public enum  ZdzhType {

    ZDZHYT01("01","耕地"),
    ZDZHYT011("011","水田"),
    ZDZHYT012("012","水浇地"),
    ZDZHYT013("013","旱地"),
    ZDZHYT02("02","园地"),
    ZDZHYT021("021","果园"),
    ZDZHYT022("022","茶园"),
    ZDZHYT023("023","其他园地"),
    ZDZHYT03("03","林地"),
    ZDZHYT031("031","有林地"),
    ZDZHYT032("032","灌木林地"),
    ZDZHYT033("033","其他林地"),
    ZDZHYT04("04","草地"),
    ZDZHYT041("041","天然牧草地"),
    ZDZHYT042("042","人工牧草地"),
    ZDZHYT043("043","其他草地"),
    ZDZHYT05("05","商服用地"),
    ZDZHYT051("051","批发零售用地"),
    ZDZHYT052("052","住宿餐饮用地"),
    ZDZHYT053("053","商务金融用地"),
    ZDZHYT054("054","其他商服用地"),
    ZDZHYT06("06","工矿仓储用地"),
    ZDZHYT061("061","工业用地"),
    ZDZHYT062("062","采矿用地"),
    ZDZHYT063("063","仓储用地"),
    ZDZHYT07("07","住宅用地"),
    ZDZHYT071("071","城镇住宅用地"),
    ZDZHYT072("072","农村宅基地"),
    ZDZHYT08("08","公共管理与公共服务用地"),
    ZDZHYT081("081","机关团体用地"),
    ZDZHYT082("082","新闻出版用地"),
    ZDZHYT083("083","科教用地"),
    ZDZHYT084("084","医卫慈善用地"),
    ZDZHYT085("085","文体娱乐用地"),
    ZDZHYT086("086","公共设施用地"),
    ZDZHYT087("087","公园与绿地"),
    ZDZHYT088("088","风景名胜设施用地"),
    ZDZHYT09("09","特殊用地"),
    ZDZHYT091("091","军事设施用地"),
    ZDZHYT092("092","使领馆用地"),
    ZDZHYT093("093","监教场所用地"),
    ZDZHYT094("094","宗教用地"),
    ZDZHYT095("095","殡葬用地"),
    ZDZHYT10("10","交通运输用地"),
    ZDZHYT101("101","铁路用地"),
    ZDZHYT102("102","公路用地"),
    ZDZHYT103("103","街巷用地"),
    ZDZHYT104("104","农村道路"),
    ZDZHYT105("105","机场用地"),
    ZDZHYT106("106","港口码头用地"),
    ZDZHYT107("107","管道运输用地"),
    ZDZHYT11("11","水域及水利设施用地"),
    ZDZHYT111("111","河流水面"),
    ZDZHYT112("112","湖泊水面"),
    ZDZHYT113("113","水库水面"),
    ZDZHYT114("114","坑塘水面"),
    ZDZHYT115("115","沿海滩涂"),
    ZDZHYT116("116","内陆滩涂"),
    ZDZHYT117("117","沟渠"),
    ZDZHYT118("118","水工建筑用地"),
    ZDZHYT119("119","冰川及永久积雪"),
    ZDZHYT12("12","其他土地"),
    ZDZHYT121("121","空闲地"),
    ZDZHYT122("122","设施农用地"),
    ZDZHYT123("123","田坎"),
    ZDZHYT124("124","盐碱地"),
    ZDZHYT125("125","沼泽地"),
    ZDZHYT126("126","沙地"),
    ZDZHYT127("127","裸地"),
    ZDZHYT20("20","城镇村及工矿用地"),
    ZDZHYT201("201","城市"),
    ZDZHYT202("202","建制镇"),
    ZDZHYT203("203","村庄"),
    ZDZHYT204("204","采矿用地"),
    ZDZHYT205("205","风景名胜及特殊用地");


    private final String code;
    private final String name;

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static ZdzhType get(String code) {
        return Stream.of(values())
                .filter(d -> Objects.equals(code, d.code))
                .findFirst()
                .orElse(null);
    }
}
